<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

<!DOCTYPE html>
<html>
<head>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量 
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。 
	pageContext.setAttribute("basePath", basePath);
	//out.write(basePath);
%>
    <title></title>
    <meta charset="UTF-8">
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/bootstrap.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/bootstrap-responsive.css" />
    <link rel="stylesheet" type="text/css" href="<%=basePath%>logined/Add/Css/style.css" />
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/jquery.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/bootstrap.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/ckform.js"></script>
    <script type="text/javascript" src="<%=basePath%>logined/Add/Js/common.js"></script>
<script>
function checkMe(){
	//密码非空验证
		var sturecord = document.getElementById("sturecord").value;
		
		//信息提示框
		
		if(sturecord == null || sturecord == ""){		
			
			
			
			return false;
		}else{
			//验证通过  清空提示内容
			psw.innerHTML = "";
			return true;
		}
}

</script>
<script>
    $(function () {       
		$('#backid').click(function(){
				window.location.href="<%=basePath %>logined/teaindex.jsp";
		 });

    });
    </script>
    <script>
    function gettime(){
    	var d = new Date();
    	document.getElementById("time").innerHTML =d.getFullYear() + "年" + (d.getMonth()+1) + "月" + d.getDate()+ "日";;
    	window.setTimeout("gettime()",1000);
    	}
    	window.onload = gettime;
    </script>
 

    <style type="text/css">
        body {
            padding-bottom: 40px;
        }
        .sidebar-nav {
            padding: 9px 0;
        }

        @media (max-width: 980px) {
            /* Enable use of floated navbar text */
            .navbar-text.pull-right {
                float: none;
                padding-left: 5px;
                padding-right: 5px;
            }
        }


    </style>
</head>
<body>
<form action="<%=basePath%>TeaBatchAddServlet" method="post"  class="form-inline definewidth m20">    
  

 <div>
<table class="table table-bordered table-hover definewidth m10">
    <thead>
    <tr>
        <th>序号</th>
        <th>学生学号</th>
        <th>学生姓名</th>
        <th>课程</th>
        <th>成绩</th>
       
    </tr>
    </thead>
   <tbody>
      <!-- 从TeaInfoModifyServlet获取session-lstStulenth -->
      <input type="hidden"  id="stulenth" name="stulenth" value="${sessionScope.lstStulenth }"/>
     
      <c:forEach items="${sessionScope.lstStu }" var="eachUser" varStatus="st">
	     <tr>
	     <input type="hidden"  id="stunum" name="stunum${st.index+1}" value="${eachUser.stu_num }"/>
	     
            <td>${st.index+1 }</td>
            <td>${eachUser.stu_id }</td>
            <td>${eachUser.stu_name }</td>
            <td>${eachUser.stu_course }</td>
            <td><input type="text" id="sturecord" name="sturecord${st.index+1}" style="text-align: center" placeholder="输入成绩" 
             value="${eachUser.stu_record}" /></td>
	     
            
        </tr>
      </c:forEach>
      <tr>
        <td class="tableleft"></td>
        <td>
        <!-- onclick="return checkMe()" -->
            <button type="submit" class="btn btn-primary" type="button" >保存</button> &nbsp;&nbsp;
            <button type="reset" class="btn btn-success" >重置</button>
        </td>
    </tr>
   </tbody>	
</table>
</div> 
</form>
</body>
</html>
